<script setup>
import { RouterView } from 'vue-router'
import { useRouter } from 'vue-router'
import { onMounted } from 'vue'
// 路由实例
const router = useRouter()
onMounted(async () => {
  // 页面刷新如果不是首页
  if (router.path !== '/home') {
    // 替换到首页
    await router.replace('home')
  }
})
</script>

<template>
  <RouterView />
</template>

<style>
html,
body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
}

a {
  text-decoration: none;
}

li {
  list-style: none;
}
</style>
